\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{geometry}
\usepackage{ragged2e}
\usepackage{amsmath}
\title{Numerical Analysis Homework 1}
\author{3200102450 \quad Zhangwen}
\date{September 2022}

\begin{document}

\maketitle

\section*{1}
\begin{flushleft}
1.The width of the interval at the nth step is $\frac{1}{2^{n-1}}$.

2.The maximum possible distance between the root r and the midpoint of the interval is 1.
\end{flushleft}

\section*{2}  
\begin{flushleft}
Let r be the root of $f(x)$.

After n steps,the relative error is less than $\frac{b_{0}-a_{0}}{2^{n+1}r}$.

Because $$n>=\frac{\log{(b_{0}-a_{0})}-\log{\epsilon}-\log{a_{0}}}{\log{2}}-1$$

we have $$\frac{b_{0}-a_{0}}{2^{n+1}r}<=\frac{a_{0}\epsilon}{r}<=\epsilon$$
\end{flushleft}

\section*{3}
\begin{flushleft}
For the polynomial equation $p(x)=4x^3-2x^2+3=0$,we can calculate $p'(x)=12x^2-4x$.

Since $x_{0}=-1$,we have 
\begin{equation}
    \begin{array}{cccc}
  times &    x    &   f(x)  &  f'(x) \\
    0   & -1.0000 & -3.0000 & 16.0000\\
    1   & -0.8125 & -0.4658 & 11.1719\\
    2   & -0.7708 & -0.0201 & 10.2129\\
    3   & -0.7688 & -0.0000 & 10.1686\\
    4   & -0.7688 & -0.0000 & 10.1685\\
    
\end{array}
\end{equation}

\end{flushleft}

\section*{4}
\begin{flushleft}
We have $x_{n+1}=x_{n}-\frac{f(x_{n})}{f'(x_{0})}$

Then,
\begin{align}
    e_{n+1}&=f(x_{n+1})=f(x_{n})+f'(x_{n})(x_{n+1}-x_{n})\\
    &=f(x_{n})+f'(x_{n})(-\frac{f(x_{n})}{f(x_{0})})\\
    &=(1-\frac{f'(x_{n})}{f(x_{0})})e_{n}
\end{align}

So $C=1-\frac{f'(x_{n})}{f(x_{0})}$ and $s=1$
\end{flushleft}

\section*{5}
\begin{flushleft}
If $x_{n}>0$,we have$x_{n+1}=\arctan(x_{n})$,because $\arctan(x_{n})<x_{n}$,$x_{n+1}<x_{n}$,
since $x_{n}>0$,${x_{n}}$ converges.

Let $L=\lim_{n \to \infty}x_{n}$,so $L=\arctan(L)$,that is,$L=0$.

It's similar if $x_{n}<0$.
\end{flushleft}

\section*{6}
\begin{flushleft}
Let $x_{n}=\frac{1}{x_{n-1}+p}$ and $x_{1}=\frac{1}{p}$

We have $x_{n}<x_{n-1}$ and $x_{n}>0$,so $\lim_{n \to \infty}x_{n}$ exists.

Let $L=\lim_{n \to \infty}x_{n}$,so $L=\frac{1}{p+L}$,that is,$L=\frac{-p+\sqrt{p^2+4}}{2}$
\end{flushleft}

\section*{7}
\begin{flushleft}
If $$n>=\frac{\log{(b_{0}-a_{0})}-\log{\epsilon}}{\log{2}}-1$$
The error is lower than $\epsilon$

However,the relative error can not be measured because the root can be zero.
\end{flushleft}


\end{document}